package com.meal.base.controller.base;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: meal->TestController
 * @description: 测试前端控制器
 * @author: yangzhanghui
 * @create: 2020-03-06 10:00
 **/
@RestController
public class TestController {
    @Autowired
    MessageSource messageSource;
    @GetMapping("/hello")
    public String hello() {
        return messageSource.getMessage("username", null, LocaleContextHolder.getLocale());
    }
}
